package com.mydomain.Bodega;

import com.mydomain.Bodega.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("pgFreespacemapRelationsHome")
public class PgFreespacemapRelationsHome extends
		EntityHome<PgFreespacemapRelations> {

	public void setPgFreespacemapRelationsId(PgFreespacemapRelationsId id) {
		setId(id);
	}

	public PgFreespacemapRelationsId getPgFreespacemapRelationsId() {
		return (PgFreespacemapRelationsId) getId();
	}

	public PgFreespacemapRelationsHome() {
		setPgFreespacemapRelationsId(new PgFreespacemapRelationsId());
	}

	@Override
	public boolean isIdDefined() {
		if (getPgFreespacemapRelationsId().getAvgrequest() == null)
			return false;
		if (getPgFreespacemapRelationsId().getInterestingpages() == null)
			return false;
		if (getPgFreespacemapRelationsId().getNextpage() == null)
			return false;
		if (getPgFreespacemapRelationsId().getReldatabase() == null)
			return false;
		if (getPgFreespacemapRelationsId().getRelfilenode() == null)
			return false;
		if (getPgFreespacemapRelationsId().getReltablespace() == null)
			return false;
		if (getPgFreespacemapRelationsId().getStoredpages() == null)
			return false;
		return true;
	}

	@Override
	protected PgFreespacemapRelations createInstance() {
		PgFreespacemapRelations pgFreespacemapRelations = new PgFreespacemapRelations();
		pgFreespacemapRelations.setId(new PgFreespacemapRelationsId());
		return pgFreespacemapRelations;
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public PgFreespacemapRelations getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

}
